package com.gitee.ywj1352.gateway.filter;

import com.gitee.ywj1352.gateway.jwt.JWTUtil;
import com.gitee.ywj1352.gateway.rpc.ClientAuthRpc;
import com.netflix.zuul.ZuulFilter;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 权限过滤器
 * Created by wenjie.yang on 6/28/2018.
 */
public class AccessFilter extends ZuulFilter {


    @Autowired
    private ClientAuthRpc clientAuthRpc;

    @Autowired
    private JWTUtil jwtUtil;

    @Override
    public String filterType() {
        return "pre";
    }

    @Override
    public int filterOrder() {
        return 0;
    }

    @Override
    public boolean shouldFilter() {
        return true;
    }

    @Override
    public Object run() {

        return new Object();
    }

}
